Write-Host "========================================"
Write-Host "清理并重新编译项目"
Write-Host "========================================"

Write-Host "`n1. 停止所有Java进程"
Get-Process -Name java -ErrorAction SilentlyContinue | Stop-Process -Force
Start-Sleep -Seconds 2

Write-Host "`n2. 清理项目"
mvn clean

Write-Host "`n3. 编译项目"
mvn compile -DskipTests

Write-Host "`n4. 安装所有模块"
mvn install -DskipTests

Write-Host "`n========================================"
Write-Host "编译完成！现在可以在IDEA中重新启动应用"
Write-Host "========================================"

